import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { isMobile } from '/src/utils/mobile.js'
import './assets/css/reset.css'
import './assets/css/common.css'
import 'vant/lib/index.css'
import vant from 'vant'
import 'element-plus/dist/index.css'
import ElementPlus from 'element-plus'
import store from '/src/store/index.js'
import BaiduMap from 'vue-baidu-map-3x'
isMobile() ? import ('./assets/css/wap.css') : import ('./assets/css/pc.css');

const ws = `ws://localhost:8082`

const app = createApp(App)

// 挂载全局变量
app.provide('global',{
  ws
})

app.use(vant)
app.use(ElementPlus)
app.use(store)
app.use(router)
app.use(BaiduMap, {
    // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
    ak: 'gEAz5KPSKCi32UBz0j3jmgBsCB8WYyci',
    //v:'2.0',  // 默认使用3.0
    // type: 'WebGL' // ||API 默认API  (使用此模式 BMap=BMapGL)
  });

app.mount('#app')
